﻿@using ECG.Utility
@model IEnumerable<ECG.Common.ProductTagDto>
@if(Model.Any())
{
    var itemLast = Model.Last();
    var comma = ",";
    <div class="p-d-tags clr m-b-20 m-t-15">
        <strong>Từ khóa liên quan: </strong>
        @foreach(var item in Model)
        {
            if(item.Id == itemLast.Id)
            {
                <a href="@Url.Action("ProductListByTag","ProductTag", new { name = StringUtil.RemoveSpecialCharactersVn(item.Name), id = @item.Id })" rel="tag">@item.Name</a>
            }
            else
            {
                <a href="@Url.Action("ProductListByTag","ProductTag", new { name = StringUtil.RemoveSpecialCharactersVn(item.Name), id = @item.Id })" rel="tag">@item.Name</a>@comma
            }
        }
    </div>
}
